<template>
	<u--image @click="click" :mode="mode" :shape="shape" :src="src" :width="width" :height="height" :radius="radius">
		<template v-slot:loading>
			<u-loading-icon color="#86909c" mode="circle" inactiveColor="#f2f3f5"></u-loading-icon>
		</template>
		<u-icon slot="error" name="warning" color="#86909c"></u-icon>
	</u--image>
</template>

<script>
	export default {
		props: {
			src: {
				type: [String],
				default: ''
			},
			height: {
				type: [String, Number],
				default: '124rpx'
			},
			width: {
				type: [String, Number],
				default: '124rpx',
			},
			radius: {
				type: [String, Number],
				default: 0,
			},
			// 图片形状，circle-圆形，square-方形
			shape: {
				type: String,
				default: 'square',
			},
			mode: {
				type: String,
				default: 'aspectFill',
			},
		},
		methods:{
			click(){
				this.$emit('click')
			}
		}
	}
</script>